<template>
    <div class="home_card">
        <div class="card_top">
            <el-avatar :size="60" :src="props.data.img" />
            <div class="details">
                <span>{{ props.data.name }}</span>
                <span>{{ props.data.jobNo }}</span>
            </div>
        </div>
        <div class="btn">
            <el-button :type="props.data.type" round>{{ props.data.buttText }}</el-button>
        </div>
    </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue';

const props = defineProps({
    data: {
        type: Object,
        default: () => { }
    }
})
onMounted(() => [

])
</script>

<style scoped lang="scss">
.home_card {
    display: flex;
    flex-direction: column;
    width: 200px;
    height: 120px;
    margin: 20px;
    .card_top{
        display: flex;
        justify-content: space-around;
    }
    .details {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 14px;
        margin-left: 10px;
        color: #5e6064;
        span:nth-child(1) {
            font-size: 18px;
            margin-bottom: 10px;
            color: #000;
        }
    }
    .btn{
        width: 100%;
        position: relative;
        display: flex;
        justify-content: center;
        margin-top: 20px;
        &::after{
            position: absolute;
            top:-10px;
            display: block;
            content: "";
            width: 150px;
            border-top: 1px solid #ccc;
        }
    }
}
</style>